package top.yxqz.number4.service.imp;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.yxqz.number4.entity.Emp;
import top.yxqz.number4.mapper.EmpMapper;
import top.yxqz.number4.service.EmpService;

/**
 * @author: 余小小
 * @date: 2023/9/15
 * @description：
 */
@Service
@Slf4j
public class EmpServiceImp extends ServiceImpl<EmpMapper,Emp> implements EmpService {

    @Autowired
    private EmpMapper mapper;

    @Override
    public int addEmp(Emp emp) {
        return mapper.insert(emp);
    }

    @Override
    public void updateEmp(Emp emp) {
        int i = mapper.updateById(emp);
        log.info("i: " + i);
    }
}
